package org.xmdl.silk.wrap;

import org.xmdl.silk.Variable;
import org.xmdl.silk.impl.VariableImpl;
import org.xmdl.silk.visit.Visitor;

public class VariableWrap extends VariableImpl implements Wrapped {

	private final Variable w;

	public VariableWrap(Variable w) {
		this.w = w;
		this.name = w.getName();
	}

	@Override
	public String getName() {
		return w.getName();
	}

	@Override
	public void setName(String newName) {
		this.name = newName;
		w.setName(newName);
	}

	public boolean accept(Visitor visitor) {
		return (visitor.visit(this));
	}

}
